
import c from "@/utils/Constant.js"
const ACTION_TEXT_MAP = new Map();  //保存动作以及其对应的文本的集合 
ACTION_TEXT_MAP.set(c.action.NO_SPEAK,"禁言");
ACTION_TEXT_MAP.set(c.action.NORMAL_SPEAK,"解除禁言");
ACTION_TEXT_MAP.set(c.action.APPROVED,"审核通过");
ACTION_TEXT_MAP.set(c.action.NOT_APPROVED,"审核不通过");
ACTION_TEXT_MAP.set(c.action.FOLLOW,"关注");
ACTION_TEXT_MAP.set(c.action.LIKE,"点赞");
ACTION_TEXT_MAP.set(c.action.REPLY,"回复");
ACTION_TEXT_MAP.set(c.action.PRIVATE_CHAT,"私聊");
const ENTITY_TYPE_TEXT_MAP = new Map();//保存实体类型以及其对应的文本的集合
ENTITY_TYPE_TEXT_MAP.set(c.entityType.USER,"用户");
ENTITY_TYPE_TEXT_MAP.set(c.entityType.TOPIC,"话题");
ENTITY_TYPE_TEXT_MAP.set(c.entityType.COMMENT,"评论");

export default {
	//根据实体类型获取文本
	getTextByEntityType(key){
		return ENTITY_TYPE_TEXT_MAP.get(key);
	},
	//根据动作获取文本
	getTextByAction(key){
		return ACTION_TEXT_MAP.get(key);
	},
}